<ul id="red" class="treeview-red" style="font-size: 9px;">
<% @father_node.list_cultural_heritages.each do |node| %>
  <% @cultural_heritage_cultural_heritage.list_nodes.each do |n| %>
    
      <li <%if node.id == n.to_i%> class="open"<%end%>>          
  <%end%>
  <% if node.id == @cultural_heritage_cultural_heritage.id %>
    <span><%=node.name_code%></span>
  <%else%>
    <%if node.group==1%>
      <span><%= link_to node.name_code,{:controller=>"/cultural_heritage/cultural_heritages",:action => 'show',:id => node.id},:title => node.description%></span>
    <%else%>
      <span><%= link_to node.name_code,{:controller=>"/cultural_heritage/cultural_heritage_properties",:action => 'show',:id => node.id},:title => node.description%></span>
    <%end%>
  <%end%>
    <%@aux =  @father_node%>
    <%if node.list_cultural_heritages.size > 0%>
      <%@father_node = CulturalHeritage::CulturalHeritage.find(node.id) %>
      <%if @father_node.list_cultural_heritages.size > 0 %>
          <%= render :partial=>"show_assign" %>
      <%end%>
    <%end%>
    <%@father_node = @aux %>
  </li>
<%end%>
</ul>